package com.rchat.pocmini.activity.binddevice;

import com.aso.common.http.delegate.HttpCallbackImpl;
import com.rchat.pocmini.common.mvp.BaseModel;
import com.rchat.pocmini.common.mvp.BasePresenter;
import com.rchat.pocmini.common.mvp.BaseView;

import java.util.ArrayList;

/**
 * Created by sudf on 2017/9/12.
 */

public interface BindDeviceContract {
    interface View extends BaseView {
        /**
         * 列表刷新
         */
        void updateList(ArrayList<String> devicesMac);

        /**
         * 展示解绑的设备的mac地址
         */
        void showUnbindMacAddress(String macAddress);
    }

    abstract class Presenter extends BasePresenter<View, Model> {
        /**
         * 激活设备
         *
         * @param qrCode 激活码
         */
        abstract void activate(String qrCode);

        /**
         * 绑定蓝牙设备MAC地址
         *
         * @param macAddress
         */
        abstract void bindDevice(String macAddress);

        /**
         * 绑定蓝牙设备MAC地址
         *
         * @param macAddress
         */
        abstract void unBindDevice(String macAddress);
    }

    interface Model extends BaseModel {
        /***
         * 激活设备
         * @param url
         * @param body
         * @param callback
         */
        void activate(String url, String body, HttpCallbackImpl callback);

        /**
         * 绑定蓝牙设备MAC地址
         *
         * @param url
         * @param body
         * @param callback
         */
        void bindDevice(String url, String body, HttpCallbackImpl callback);

        /**
         * 解绑蓝牙设备MAC地址
         *
         * @param url
         * @param body
         * @param callback
         */
        void unBindDevice(String url, String body, HttpCallbackImpl callback);
    }
}
